package com.common.utils;

import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;

public class Test {
    public static void main(String[] args) {
        String str = "itemIndex,otherParty,startTime,cityName,callType,longType,roamType,callDuration,mnsType,fee,times1,sdiscountCfee,sdiscountLfee,sdiscountOtherfee,lac1,cellId1,msc,isNewvoice,fileNo," +
                "itemIndex,otherParty,applyTime,callType,fee,para1,para2," +
                "itemIndex,startTime,apnni,netCode,callDuration,visitAreaCode,imei,f35,f36," +
                "itemIndex,startTime,endTime,msisdn,f1,callDuration,dataAll,messageType,f2,chargeType,fee," +
                "itemIndex,otherParty,startTime,spCode,operCode,chargeType,tradeType,f1,f2,f3,subscribe,f5,sifee,para1,para2," +
                "itemIndex,otherParty,startTime,callDuration,callType,msgsender,visitAreaCode,callingAreaName,msgreceiver,dataAll,chargeType,fee,para1,para2," +
                "itemIndex,otherParty,applyTime,callType,spCode,spName,operCode,bizName,fee,para1,para2," +
                "itemIndex,otherParty,startTime,endTime,spCode,operCode,f5,fee,spName,bizName,para1,para2," +
                "itemIndex,spCode,spName,operCode,startTime,chargeType,fee,para1,para2," +
                "itemindex,otherparty,starttime,calltype,spcode,spname,code,bizname,fee,para1,para2," +
                "itemIndex,msisdn,str2,startTime,callDuration,chargeType,operCode,carryType,fee,para1,para2," +
                "itemIndex,callType,startTime,spCode,operCode,chargeType,sifee,smfee,fee," +
                "itemIndex,startTime,carryType,chargeType,callType,callDuration,spName,bizName,spCode,operCode,spDesc,sifee,sbfee,smfee,fee,para1,para2," +
                "itemIndex,otherParty,startTime,subscribeType,f11,f12,f13,f14,callDuration,fee,para1,para2," +
                "itemIndex,spCode,spName,operCode,bizName,startTime,callDuration,fee,para1,para2," +
                "itemIndex,startTime,spName,chargeType,infoLen,fee," +
                "itemIndex,sourceType,applyTime,otherParty,callType,infoLen,spName,bizName,spCode,operCode,chargeType,fee," +
                "itemIndex,msisdn,otherParty,startTime,operCode,biztype,compTag,fee,score,chargeType,billingMode," +
                "itemIndex,startTime,otherParty,callDuration,callType,roamType,longType,fee," +
                "itemIndex,startTime,callDuration,chargeType,operCode,spCode,spName,effectiveNum,effectiveTime,sifee," +
                "itemIndex,startTime,endTime,callDuration,chargeType,dataUp,dataDown,sbfee," +
                "itemIndex,startTime,otherParty,registerId,cancelTag,sifee," +
                "itemIndex,otherParty,startTime,visitAreaCode,callType,longType,roamType,callDuration,fee," +
                "serviceType,startTime,otherParty,callDuration,slfee," +
                "startTime,msisdn,otherParty,callDuration,callType,serviceType,scfee," +
                "itemIndex,startTime,callDuration,otherParty,callType,spCode,spName,operCode,bizName,fee,para1,para2," +
                "itemIndex,otherParty,startTime,spCode,operCode,fee,para1,para2," +
                "itemIndex,startTime,callDuration,roamType,fee,switchType,f1,f3,f4,para1,para2," +
                "itemIndex,startTime,callDuration,apnni,netCode,visitAreaCode,f35,lac,cellId,cellType,space,fileNo," +
                "itemIndex,serialNumber,visitAreaCode,netCode,cellId,f35,space," +
                "itemIndex,otherParty,startTime,callDuration,visitAreaCode,fee,para1,para2," +
                "itemIndex,serialNumber,spCode,startTime,endTime,operCode,chargeType,fee,para1,para2," +
                "itemIndex,serialNumber,chargeType,time,spCode,operCode,bizName,fee,para1,para2," +
                "itemIndex,serialNumber,spCode,startTime,endTime,operCode,chargeType,fee,para1,para2," +
                "itemIndex,serialNumber,spCode,startTime,endTime,operCode,chargeType,fee,para1,para2," +
                "itemIndex,otherParty,applyTime,callType,fee,para1,para2," +
                "itemIndex,msisdn,otherParty,startTime,callType,longType,roamType,callDuration,mnsType,fee,imei,fileNo,para1,para2," +
                "itemIndex,startTime,sourceType,bizName,operCode,spName,spCode,feeName,discountFee," +
                "itemIndex,serialNumber,visitAreaCode,netCode,cellId,f35,space," +
                "itemIndex,serialNumber,visitAreaCode,netCode,cellId,f35,space," +
                "itemIndex,spCode,spName,operCode,bizName,startTime,chargeType,fee,para1,para2," +
                "itemIndex,otherParty,spCode,spName,chargeType,startTime,fileId,bizName,fee,para1,para2," +
                "itemIndex,serialNumber,chargeType,time,spCode,spName,operCode,bizName,fee,para1,para2," +
                "itemIndex,spCode,spName,operCode,sifee,smfee,startTime,chargeType,bizName,corpName,para1,para2," +
                "itemIndex,serialNumber,chargeType,time,spCode,spName,operCode,bizName,fee,para1,para2," +
                "itemIndex,serialNumber,spCode,spName,startTime,endTime,operCode,bizName,chargeType,fee,para1,para2";
        String[] split = str.split(",");
        Set set = new HashSet(Arrays.asList(split));
        System.out.println(set);
        System.out.println(set.size());

        String used = "dataUp," +
                "startTime," +
                "apnni," +
                "vplmn1," +
                "acycStartTime," +
                "cellId," +
                "space," +
                "serialNumber," +
                "serviceName," +
                "feeMode," +
                "acycEndTime," +
                "rateMode," +
                "dealTime," +
                "f34," +
                "fee," +
                "f36," +
                "f35," +
                "imei," +
                "lac," +
                "fileNo," +
                "cellType," +
                "callDuration," +
                "netCode," +
                "roamType," +
                "splitFlag," +
                "chargingId," +
                "dataAll," +
                "hfxTotalFlow," +
                "number," +
                "dataUpAll," +
                "allFee," +
                "dataAllCellId," +
                "dataDownAll," +
                "dataDown," +
                "serviceType," +
                "visitAreaCode," +
                "isPrint," +
                "svcContent," + 
                "sumDatas," +
                "cfeeLfee," +
                "discountFee";

        String[] split2 = used.split(",");
        Set set2 = new HashSet(Arrays.asList(split2));
        set.removeAll(set2);

        System.out.println(set);
        System.out.println(set.size());

    }

}
